#pragma once

#include <string>

#include "socket.h"
namespace network
{
class client
{
public:
    client(const std::string& ip, const port_t port, recv_callback call = nullptr);
    client(const address& a, recv_callback call = nullptr);
    int send(const std::string& data);
    ~client();
private:
    void process_recv();
private:
    bool m_recv_run = true;
    void init(recv_callback call);
    mSOCKET  m_socket;
    address* m_addr;
    recv_callback m_callback;
};
}